﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.ComponentModel.Composition;

namespace OpenExpressApp
{
    public interface IViewFactory
    {
        IListObjectView CreateListView(Type entityType);
    }

    public static class ViewFactory
    {
        private static IViewFactory _instance;

        public static IViewFactory Instance
        {
            get
            {
                Debug.Assert(_instance != null, "_instance != null。请先注入此接口");

                return ViewFactory._instance;
            }
            set
            {
                ViewFactory._instance = value;
            }
        }
    }
}
